#ifndef H_PHYSICSACTOR
#define H_PHYSICSACTOR

//Physics drawing defines
#define CUBESHAPE 1
#define CAPSULESHAPE 2
#define FLATSHAPE 3


#include "actor.h"
#include "particleSystem.h"

class PhysicsActor: public Actor{

public:
  dBodyID body;
  dGeomID geom;

  GLuint capsuleList;

  dWorldID world;
  dSpaceID space;

  int type;

  Vector3f shape;

  dReal    mass;

  ParticleSystem * drawing;

  PhysicsActor();
  PhysicsActor(Vector3f myShape,dReal myMass, int myType);

  virtual ~PhysicsActor();

  virtual void setup();
  virtual void draw();
  virtual void drawParticles();
  virtual void drawCollision();

  virtual void drawCollisionBox() const;
  virtual void generateCapsuleList();

  virtual void update(double deltaTime);
  virtual void setLocation(Vector3f loc);
  virtual void setRotation(Vector3f rot);

  virtual void setRotationVec(Vector3f rot);

  virtual TiXmlElement* save(TiXmlElement *root);
  virtual void load(TiXmlElement *myInfo);

  void setRotationODE(Vector3f vec);
};
#endif
